﻿@using KMF.WebUI.Areas.KMFadmin.CustomHelpers
@using KMF.WebUI.Areas.KMFadmin.Models
@model KMF.Common.TemplateDto
@{
    ViewBag.Title = "Chỉnh sửa Template danh mục";
    Layout = "~/Areas/KMFadmin/Views/Shared/_layout.cshtml";
}

<nav>
    <div id="jCrumbs" class="breadCrumb module">
        <ul>
            <li><a href="@Url.Action("Index", "AdminHome")"><i class="bootstrap icon-home"></i></a></li>
            <li><a href="javascript:void(0);">Chỉnh sửa template danh mục</a></li>
        </ul>
    </div>
</nav>

<div class="toolBox">
    @Html.ToolBox(new List<object> { new Edit { ClassCss = "Edit", ActionName = "Javascript:void(0)" }, new Back { ClassCss = "Back", ActionName = "/KMFadmin/AdminProductCategory/TemplateList" } })
</div>

@using (Html.BeginForm("EditTemplateCategory", "AdminProductCategory", FormMethod.Post))
{
    @Html.HiddenFor(m => m.Id)
    <div class="box-Info">
        <div class="Info-header">
            <span>Chỉnh sửa template</span>
        </div>

        <div class="Info-body ib-infopro">
            <div>@Html.ValidationMessage("ErrorSummary")</div>
            <table cellpadding="0" cellspacing="0" width="100%" border="0" class="table-info">
                <tr>
                    <td class="tInfoLeft">
                        Mô tả template
                    </td>
                    <td class="tInfoRight">
                        @Html.TextBoxFor(m => m.Description)
                        @Html.ValidationMessageFor(m => m.Description)
                    </td>
                </tr>
                <tr>
                    <td class="tInfoLeft">
                        Nội dung template
                    </td>
                    <td class="tInfoRight">
                        @Html.TextAreaFor(m => m.TempContent, new { rows = 30, @class = "w-90-percent" })
                        @Html.ValidationMessageFor(m => m.TempContent)
                    </td>
                </tr>
            </table>
        </div>
    </div>
}

@section scripts
{
    <script src="~/Areas/KMFadmin/Scripts/jquery.validate.min.js"></script>
    <script src="~/Areas/KMFadmin/Scripts/jquery.validate.unobtrusive.min.js"></script>
    <script>
        SubmitFormUseToolBox($('ul li.Edit a'), $('form'));
    </script>
}
